<!-- 封装底部tabbar -->
<template>
  <van-tabbar v-model="activeIndex" route :z-index="100" active-color="#ff734c">
    <van-tabbar-item to="/home" icon="wap-home">首页</van-tabbar-item>
    <van-tabbar-item to="/category" icon="bars">分类</van-tabbar-item>
    <van-tabbar-item to="/goods/search" icon="search">搜索</van-tabbar-item>
    <van-tabbar-item to="/cart" icon="shopping-cart">购物车</van-tabbar-item>
    <van-tabbar-item to="/profile" icon="friends">我的</van-tabbar-item>
  </van-tabbar>
</template>

<script>
import { Tabbar, TabbarItem } from "vant";
export default {
  data() {
    return {
      activeIndex: 0,
    };
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
  },
};
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>